<?php



class HistoriaMapBuilder {

	
	const CLASS_NAME = 'lib.model.map.HistoriaMapBuilder';

	
	private $dbMap;

	
	public function isBuilt()
	{
		return ($this->dbMap !== null);
	}

	
	public function getDatabaseMap()
	{
		return $this->dbMap;
	}

	
	public function doBuild()
	{
		$this->dbMap = Propel::getDatabaseMap('propel');

		$tMap = $this->dbMap->addTable('historia');
		$tMap->setPhpName('Historia');

		$tMap->setUseIdGenerator(true);

		$tMap->setPrimaryKeyMethodInfo('historia_SEQ');

		$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addPrimaryKey('NUMHISTORIA', 'Numhistoria', 'string', CreoleTypes::VARCHAR, true, 10);

		$tMap->addColumn('FECHA', 'Fecha', 'int', CreoleTypes::DATE, false, null);

		$tMap->addColumn('ELABORADOPOR', 'Elaboradopor', 'string', CreoleTypes::VARCHAR, false, 50);

		$tMap->addForeignKey('CEDULA', 'Cedula', 'string', CreoleTypes::VARCHAR, 'persona', 'CEDULA', true, 9);

	} 
} 